﻿using System;
using System.Linq;
using System.IO;

namespace _24.ExtractTextFromHTML
{
    class ExtractTextFromHTML
    {
        static void Main(string[] args)
        {
            string text = string.Empty;
            using (var reader = new StreamReader("../../../text.html"))
            {
                text = reader.ReadToEnd();
            }
            int startIndex = text.IndexOf('<');
            int endIndex = text.IndexOf('>');
            while (startIndex >= 0)
            {
                text = text.Remove(startIndex, endIndex - startIndex + 1);

                startIndex = text.IndexOf('<');
                endIndex = text.IndexOf('>');
            }
            Console.WriteLine(text);
        }
    }
}
